fix: strict type safety with Pydantic validation and comprehensive negative tests#2
Merged
Merged
Conversation
…nsive negative tests - Regenerate types from corrected OpenAPI spec (nullable/default fixes) - Add preprocessing script (scripts/preprocess_spec.py) respecting default values - Add runtime validation layer (src/devhelm/_validation.py) - Validate all API inputs via Pydantic before sending requests - Parse all API responses through Pydantic models - Add 410 negative validation tests (tests/test_negative_validation.py) - Add schema correctness tests (tests/test_schemas.py) - Update all 12 resource modules to use generated types and validation Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/preprocess_spec.py) that respectsdefaultvalues when setting required fieldssrc/devhelm/_validation.py) — all inputs validated via Pydantic before API calls, all responses parsed through Pydantic modelsTest plan
mypy src/— 0 issues (22 source files)pytest tests/— 542 tests passedMade with Cursor